#pragma once
#include"Box2D/Common/b2Math.h"

class Graviation;
class b2Body;

class BirdThrower
{
public:
	BirdThrower(Graviation* app, b2Body* bird,const b2Vec2& shootPoint);
	
	~BirdThrower();

	void onMouseDown(const b2Vec2& pos);
	
	void onMouseUp(const b2Vec2& pos);

	void onMouseMove(const b2Vec2& pos);

	void resetWork();
private:
	void resetAngle();
	
	bool isTouch = false;
	b2Vec2 startPos;
	b2Body * bird;
	Graviation* app;
	b2Body* pryBar;
	b2Vec2 shootPoint;
};